<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="author" content="何毓堂">
    <title></title>
    <link rel="stylesheet" type="" href="">
    <style>
        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            padding: 0;
        }

        .topside {
            height: 35px;
            display: flex;
            justify-content: flex-end;
            border: 1px solid #eee;
            line-height: 20px;
        }

        .above {
            height: 20px;
            list-style: none;
            display: flex;
            justify-content: flex-end;
            margin: 0;
            margin-top: -5px;
        }

        .register {
            height: 20px;
            list-style: none;
            display: flex;
            justify-content: flex-end;
            margin: 0;
            margin-top: -5px;
        }

        .above li {
            height: 10px;
            margin: 10px;
            font-size: 14px;
        }

        .register li {
            height: 10px;
            margin: 10px;
            font-size: 14px;
        }

        a {
            color: black;
        }

        .seek {
            margin-top: 30px;
            margin-left: 7%;
            display: flex;
            justify-content: center;
            /* position: absolute; */
        }

        .picture img {
            position: relative;
            top: -13px;
            width: 135px;
            height: 40px;
            right: 20px;
        }

        .help {
            text-align: center;
            line-height: 34px;
        }

        .help a {
            margin-left: 13px;
            font-size: 13px;
            /* background-color: red; */
        }

        .option {
            width: 100%;
            height: 20px;
            margin-left: 36%;
            font-size: 12px;
            margin-bottom: 10px;
        }

        .banner {
            /* margin-top: 20px; */
            width: 100%;
            height: 42px;
            background-color: #01204f;
            position: absolute;
        }

        .bannera {
            /* border: 1px solid violet; */
            margin-left: 21%;
            list-style: none;
            display: flex;
            /* justify-content: center; */
            position: relative;
        }

        .bannera li {
            padding: 8px 10px 12px 11px;
            display: block;
            height: 100%;
            margin-top: -16px;
        }

        .bannera li strong {
            color: white;
            font-size: 14px;
        }

        .bannera li a {
            text-decoration: none;
        }
    </style>
</head>

<body>
    <div class="topside">
        <ul class="above">
            <li><a href=""><strong>网页</strong></a></li>
            <li><a href=""><strong>新闻</strong></a></li>
            <li><a href=""><strong>贴吧</strong></a></li>
            <li><a href=""><strong>知道</strong></a></li>
            <li><a href=""><strong>音乐</strong></a></li>
            <li><a href=""><strong>图片</strong></a></li>
            <li><a href=""><strong>视频</strong></a></li>
            <li><a href=""><strong>地图</strong></a></li>
            <li><a href=""><strong>文库</strong></a></li>
        </ul>
        <ul class="register">
            <li><a href="">百度首页</a></li>
            <li> <a href="">登录</a></li>
            <li><a href="">注册</a></li>
            <li><a href="">百度新闻客户端</a> </li>
        </ul>
    </div>
    <div class="seek">
        <div class="picture">
            <img src="京东图片\1.png" alt="">
        </div>
        <input type="text" style="width:535px; height: 40px; ">
        <input type="button" value="百度一下" style="width:105px; height: 40px; background-color: #38f; border: 2px solid #38f; color:white; font-size: 16px;">
        <div class="help">
            <a href="">帮助</a>
            <a href="">高级搜索</a>
            <a href="">设置</a>
        </div>
    </div>
    <div class="option">
        <input type="radio">新闻全文
        <input type="radio">新闻标题
    </div>
    <div class="middle">
        <div class="banner">
            <ul class="bannera">
                <li style="background-color:red;"><a href=""><strong >首页</strong></a></li>
                <li><a href=""><strong>百家号</strong></a></li>
                <li><a href=""><strong>国内</strong></a></li>
                <li><a href=""><strong>国际</strong></a></li>
                <li><a href=""><strong>军事</strong></a></li>
                <li><a href=""><strong>社会</strong></a></li>
                <li><a href=""><strong>财经</strong></a></li>
                <li><a href=""><strong>娱乐</strong></a></li>
                <li><a href=""><strong>体育</strong></a></li>
                <li><a href=""><strong>互联网</strong></a></li>
                <li><a href=""><strong>科技</strong></a></li>
                <li><a href=""><strong>游戏</strong></a></li>
                <li><a href=""><strong>时尚</strong></a></li>
                <li><a href=""><strong>女人</strong></a></li>
                <li><a href=""><strong>汽车</strong></a></li>
                <li><a href=""><strong>个人推荐</strong></a></li>
                <li><a href=""><strong>更多</strong></a></li>
            </ul>
        </div>
    </div>







    <ul>
        <li>a0101</li>
        <li>a0102</li>
        <li>a0103</li>
        <li>a0104</li>
        <li>a0105</li>
        <li>a0106</li>
        <li>a0107</li>
        <li>a0108</li>
        <li>a0109</li>
        <li>a0110</li>
        <li>a0111</li>
        <li>a0112</li>
        <li>a0113</li>
        <li>a0114</li>
        <li>a0115</li>
        <li>a0116</li>
        <li>a0117</li>
        <li>a0118</li>
        <li>a0119</li>
        <li>a0120</li>
        <li>a0121</li>
        <li>a0122</li>
        <li>a0123</li>
        <li>a0124</li>
        <li>a0125</li>
        <li>a101</li>
        <li>a102</li>
        <li>a103</li>
        <li>a104</li>
        <li>a105</li>
        <li>a106</li>
        <li>a107</li>
        <li>a108</li>
        <li>a109</li>
        <li>a110</li>
        <li>a111</li>
        <li>a112</li>
        <li>a113</li>
        <li>a114</li>
        <li>a115</li>
        <li>a116</li>
        <li>a117</li>
        <li>a118</li>
        <li>a119</li>
        <li>a120</li>
        <li>a121</li>
        <li>a122</li>
        <li>a123</li>
        <li>a124</li>
        <li>a125</li>
    </ul>

</body>

</html>
<script>
    var banner = document.querySelector('.banner');
    window.onscroll = function () {
        if ((document.body.scrollTop || document.documentElement.scrollTop) >= 150) {
            banner.style.position = 'fixed';
            banner.style.top = '0';
        } else {
            banner.style.cssText = ' ';
        }

    }

</script>